how to check in python if a list object is empty